package com.lsy.on_line.zaixian.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author ShiYuan
 * @since 2022-07-24
 */
@ApiModel(value = "Episode对象", description = "章节播放顺序")
public class Episode implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("集标题")
    private String title;

    @ApiModelProperty("第几集,全局顺序")
    private Integer num;

    @ApiModelProperty("顺序，章里面的顺序")
    private Integer ordered;

    @ApiModelProperty("播放地址")
    @JsonProperty("play_url")
    private String playUrl;

    @ApiModelProperty("章节主键id")
    @JsonProperty("chapter_id")
    private Integer chapterId;

    @ApiModelProperty("0表示免费，1表示首付")
    private Integer free;

    @ApiModelProperty("视频id")
    @JsonProperty("video_id")
    private Integer videoId;

    @ApiModelProperty("创建时间")
    @JsonProperty("create_time")//将驼峰形式的取别名为下划线形式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")//日期格式取别名需要转换格式 年月日时分秒 时区为东8区
    private LocalDateTime createTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }
    public Integer getOrdered() {
        return ordered;
    }

    public void setOrdered(Integer ordered) {
        this.ordered = ordered;
    }
    public String getPlayUrl() {
        return playUrl;
    }

    public void setPlayUrl(String playUrl) {
        this.playUrl = playUrl;
    }
    public Integer getChapterId() {
        return chapterId;
    }

    public void setChapterId(Integer chapterId) {
        this.chapterId = chapterId;
    }
    public Integer getFree() {
        return free;
    }

    public void setFree(Integer free) {
        this.free = free;
    }
    public Integer getVideoId() {
        return videoId;
    }

    public void setVideoId(Integer videoId) {
        this.videoId = videoId;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Episode{" +
            "id=" + id +
            ", title=" + title +
            ", num=" + num +
            ", ordered=" + ordered +
            ", playUrl=" + playUrl +
            ", chapterId=" + chapterId +
            ", free=" + free +
            ", videoId=" + videoId +
            ", createTime=" + createTime +
        "}";
    }
}
